---
title: Send or pend a bill
summary: A user sends or pends the current bill to another mailbox and then either returns to the Inbox or, with Auto feed checked, loads the next queue bill.
status: draft
owner: Claims
last_reviewed: 2026-09-30
operation_id: send-pend-bill
trigger: User selects Send or Pend on the Bill entry screen
---

# Send or pend a bill

A user sends or pends the current bill to another mailbox and then either returns to the Inbox or, with Auto feed checked, loads the next queue bill.

## Trigger and screens

| Item | Detail |
| --- | --- |
| Trigger | User selects Send or Pend on the Bill entry screen |
| Screens | [Bill entry](../../screens/entry.md) |
| Tables | Not traced** |

## Steps

1. The screen calls [Entry.GetSendPendMailId](../hosted-endpoints.md#entry.getsendpendmailid) to prefill the last mail id kept in Session (`SendPendMailId`) or, when none is stored, the current user id.
2. The user chooses a mail id and confirms.
3. The screen posts to [Entry.SendPendBill](../hosted-endpoints.md#entry.sendpendbill) with the bill id and the mail id.
   1. The action builds a `SendPendRequest` with the bill id in `BillsToPend`, the mail id in `SendtoMailId` and today's date as `PendDate`.
   2. The action calls `IBillService.SendPendBill` with the request.
   3. When the result is not valid, the action adds each error and message to the model state and returns the errors as JSON; the bill stays on Bill entry.
   4. The internal steps of `SendPendBill` were not traced**.

   > **Origin**: Step 3.2 is the controller-side call to `IBillService.SendPendBill` in `SAIF.SAIFCode.Core`†. Per the Legends CLI RAG service, no business rule is documented for this member beyond its contract signature, and its implementation lives outside this contracts-only library and was not traced by this run*.
4. On success the controller stores the mail id, upper-cased, in Session `SendPendMailId` and returns a confirmation message.
5. The client then checks the Auto feed checkbox (`ClaimBillEntry/js/claimbillentry.entry.sendpend.js:109-113`).
   1. When Auto feed is checked, the Send/Pend modal is hidden and the screen loads the next queue bill through `getNextQueueBill`; the user stays on Bill entry.
   2. When Auto feed is not checked, the browser navigates to the [Inbox](../../screens/inbox.md) screen.

## Process flow

The diagram shows the main path and its decision points.

```mermaid
flowchart TD
    A["GetSendPendMailId"] --> B["User picks mail id"]
    B --> C["SendPendBill"]
    C --> D{"Errors returned?"}
    D -->|"Yes"| X["Show errors"]
    D -->|"No"| E["Store mail id in Session"]
    E --> G{"Auto feed checked?"}
    G -->|"Yes"| H["Hide modal, load next queue bill<br>(stay on Bill entry)"]
    G -->|"No"| F["Navigate to Inbox"]
```

## Failure and edge-case behavior

- Errors from the service are shown on the screen; the bill stays on Bill entry.
- No business rule in this repository constrains the target mailbox.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Hosted endpoints](../hosted-endpoints.md)
- [Data model](../data-model.md)
- [Architecture](../architecture.md)
- [Tech debt](../tech-debt.md)
- [Screen catalog](../../screens/index.md)

> **Note:** Statements marked with `†` are derived from dependency library
> documentation via the Legends CLI. Statements marked with `*` were inferred
> from code structure or contextual evidence. Statements marked with `**` could
> not be confirmed; treat as unknown until verified.

## Sources
- ClaimBillEntry/Controllers/EntryController.cs
- ClaimBillEntry/js/claimbillentry.entry.sendpend.js